<template>
	<view class="zai-box">
		<image src="../../../static/logo.png" class="zai-logo"></image>
		<!-- <view class="zai-title">LOGO区域</view> -->
		<view class="zai-form">
			<input class="zai-input" placeholder-class placeholder="请输入用户名" v-model="account"/>
			<input class="zai-input" placeholder-class password placeholder="请输入密码"  v-model="password"/>
			<input class="zai-input" placeholder-class password placeholder="请再输入一次密码" v-model="repassword" />
			<button class="zai-btn" @click="register">立即注册</button>
			<navigator url="../pages/Login/Loginfour" open-type='navigateBack' hover-class="none" class="zai-label">
				已有账号，点此去登录.</navigator>
		</view>
	</view>
</template>

<script>
	import {register} from '@/api/mine.js'
	export default {
		data() {
			return{				
					username:'',//帐号
					password:'',//密码
					repassword:'',//确认密码
					mobile:'',//手机号码
				}
		}
		,
		methods:{
			// 注册
			register(){
				if(account==null){
					uni.showToast({
						title:'请输入帐号'
					})
				}
				if(password==null){
					uni.showToast({
						title:'请输入密码'
					})
				}
				if(repassword==null){
					uni.showToast({
						title:'请再输入一次密码'
					})
				}
				register().then(res=>{
					console.log(res)
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.zai-box {
		padding: 0 100rpx;
		position: relative;
	}

	.zai-logo {
		width: 100%;
		height:350rpx;
	}

	.zai-title {
		position: absolute;
		top: 0;
		line-height: 360rpx;
		font-size: 68rpx;
		color: #fff;
		text-align: center;
		width: 100%;
		margin-left: -100rpx;
	}

	.zai-form {
		margin-top: 300rpx;
	}

	.zai-input {
		background: #e2f5fc;
		margin-top: 30rpx;
		border-radius: 100rpx;
		padding: 20rpx 40rpx;
		font-size: 36rpx;
	}

	.input-placeholder,
	.zai-input {
		color: #94afce;
	}

	.zai-label {
		padding: 60rpx 0;
		text-align: center;
		font-size: 30rpx;
		color: #a7b6d0;
	}

	.zai-btn {
		background: #00C049;
		color: #fff;
		border: 0;
		border-radius: 100rpx;
		font-size: 36rpx;
		margin-top: 60rpx;
	}

	.zai-btn:after {
		border: 0;
	}

	/*按钮点击效果*/
	.zai-btn.button-hover {
		transform: translate(1rpx, 1rpx);
	}
</style>
